Skip to content

Hotfix pandas encoder 2.7#325

Merged
johnwalz97 merged 5 commits intorelease-2.7from
hotfix-pandas-encoder-2.7
Feb 26, 2025
Merged

Hotfix pandas encoder 2.7#325
johnwalz97 merged 5 commits intorelease-2.7from
hotfix-pandas-encoder-2.7

Conversation

@johnwalz97
Copy link
Contributor

Internal Notes for Reviewers

External Release Notes

@johnwalz97 johnwalz97 added bug Something isn't working internal Not to be externalized in the release notes labels Feb 26, 2025
@johnwalz97 johnwalz97 changed the base branch from main to release-2.7 February 26, 2025 15:22
@github-actions
Copy link
Contributor

PR Summary

This pull request introduces several enhancements and bug fixes across different parts of the project:

  1. External API Test Update:

    • The external API test in the Jupyter notebooks has been updated to fetch a list of fake users from https://jsonplaceholder.typicode.com/users instead of fetching BTC prices. The test now categorizes users into "Model Owners/Stakeholders", "Model Developers", and "Model Validators" with randomly assigned roles and additional contact information.
  2. Date Handling Improvements:

    • The test cases in test_TimeSeriesPredictionWithCI.py and test_TimeSeriesPredictionsPlot.py have been updated to include np.datetime64 as a valid datetime type, improving the robustness of datetime index checks.
  3. Error Message Update:

    • The error message in validmind/errors.py for missing R support has been updated to provide clearer instructions for installing rpy2.
  4. Utility Enhancements:

    • The validmind/utils.py file has been enhanced to handle np.datetime64 objects and improve the handling of generic objects. A new method default has been added to provide a preview of DataFrame objects, including their type, a preview of the first five rows, and their shape.
  5. Test Execution Improvement:

    • The test execution script in tests/test_unit_tests.py now raises an exception with detailed information about failed tests instead of simply exiting, providing better feedback during test failures.

Test Suggestions

  • Verify that the updated external API test correctly fetches and processes user data from the new API endpoint.
  • Test the categorization logic for users into different roles and ensure randomness in role assignment.
  • Check that the datetime index tests correctly identify np.datetime64 objects as valid datetime types.
  • Ensure that the error message for missing R support is displayed correctly and provides clear installation instructions.
  • Test the serialization of np.datetime64 objects and generic objects in validmind/utils.py.
  • Validate the new DataFrame preview functionality in the default method of the utility class.
  • Run the test suite to ensure that the new exception handling in tests/test_unit_tests.py provides detailed failure information.

@johnwalz97 johnwalz97 merged commit 7413d53 into release-2.7 Feb 26, 2025
4 checks passed
@johnwalz97 johnwalz97 deleted the hotfix-pandas-encoder-2.7 branch February 26, 2025 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working internal Not to be externalized in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants